<html>
<head><meta charset="utf-8"><title>definition of &#x27;runs&#x27; · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html">definition of &#x27;runs&#x27;</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197066940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197066940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> zeroexcuses <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197066940">(May 10 2020 at 17:20)</a>:</h4>
<p>When we say a piece of code 'runs', does it mean "it compiles correctly, and when running, may or may not crash on unit tests", or do we mean "the code compiles + passes all unit tests" ?////</p>



<a name="197072432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197072432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197072432">(May 10 2020 at 19:03)</a>:</h4>
<p>Compiles and executes.</p>
<p>Passes unit tests or "doesn't crash" or other high standards aren't generally part of "runs".</p>



<a name="197072823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197072823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> zeroexcuses <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197072823">(May 10 2020 at 19:12)</a>:</h4>
<p>By this definition, what is a program that 'compiles' but does not 'runs' ?</p>



<a name="197073790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197073790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197073790">(May 10 2020 at 19:29)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="n">panic</span><span class="o">!</span><span class="p">();</span><span class="w"></span>
</code></pre></div>


<div class="codehilite"><pre><span></span><code><span class="k">loop</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="197074665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197074665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> zeroexcuses <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197074665">(May 10 2020 at 19:43)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> : If I'm reading <span class="user-mention" data-user-id="224471">@Lokathor</span> 's definition correctly, panic!() is allowed since "doesn't crash" is not a requirement.</p>



<a name="197083405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197083405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197083405">(May 10 2020 at 22:44)</a>:</h4>
<p>Yes, I would say that:</p>
<ul>
<li>"builds" / "runs" is "<code>cargo build</code> works without errors, and you can start the program". Since we say things like "when i run it, the program crashes", obviously we've accepted that code which "runs" isn't bug free.</li>
<li>"passes tests" is when all your unit tests and doc tests pass (which might not be enough test coverage of course).</li>
<li>"works" is when it actually can be demonstrated to do the job it's supposed to do in at least some portion of the possible situations it needs to handle. Example: "it works for <code>u8</code> but not <code>u16</code>."</li>
</ul>



<a name="197087492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/197087492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#197087492">(May 11 2020 at 00:18)</a>:</h4>
<p>I suppose dynamic loader errors would fall under builds but not runs</p>



<a name="198084446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/definition%20of%20%27runs%27/near/198084446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/definition.20of.20&#x27;runs&#x27;.html#198084446">(May 19 2020 at 15:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="299970">zeroexcuses</span> <a href="#narrow/stream/122651-general/topic/definition.20of.20'runs'/near/197074665">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> : If I'm reading <span class="user-mention silent" data-user-id="224471">Lokathor</span> 's definition correctly, panic!() is allowed since "doesn't crash" is not a requirement.</p>
</blockquote>
<p>It might even be impossible to know if the program might crash :D (ahm halting ahm)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>